1. Field of the Invention
The invention relates to a machine tool such as a wire-electrical discharge machine etc. and a controller for controlling the machine tool.
2. Description of the Related Art
In an ordinary machine tool using an endmill as a cutting tool, the final shape of a work can be obtained by creating a program by previously adding a radius of the endmill to a machining path (programmed path) as an offset value (refer to FIG. 1). Although the offset value (tool diameter correction amount) is ordinarily changed when a tool is exchanged in an offset cancel operation, only positioning (G00) and linear interpolation (G01) can be carried out during an offset mode (refer to FIG. 2). A command method is, for example, a form of G00 (or G01) of XYD, where D shows a new tool diameter correction number. As shown in FIG. 3, machining is carried out in an offset amount set to an instructed number by instructing the offset number succeeding to an address D during programming. The offset amount can be changed by changing the offset number while a program is carried out.
In a wire-electrical discharge machine that is an example of a machine tool, a method of programming a machining path for machining a work by a final dimension of the work is employed. In the method, at the time of actual machining, there is a case of finishing a final dimension of the work to a programmed dimension by carrying out machining by making shift (hereinafter called “offset”) of the radius of a wire electrode line and the removed amount, which has been removed in a vertical direction from the wire electrode line to the work (distance: hereinafter, called “electrical discharge gap”), of the amount of the block that had been removed by electrical discharge heat resulting from the electrical discharge that has been carried out between the wire electrode line and the work, i.e., electrical discharge gap to a cutting-off side with respect to a machining path programmed to the final dimension.
In the machining carried out by an ordinary machine tool, for example, a milling machine using an endmill as a cutting tool to machine a work, when a program is created by previously adding a radius of the endmill to a machining path, it is not necessary to change an offset value in actual machining. However, in a wire-electrical discharge machine, an electrical discharge gap whose distance is unknown exists in addition to a radius of a wire electrode. For this reason, when the discharge gap is not known, a program including an offset value cannot be created.
In wire electrical discharge machining, when machining is carried out by a program corresponding to a shape of a final dimension and an opposite side dimension of the shape whose dimension has been reduced by electrical discharge is measured, an offset value is determined as a value half a remaining value obtained by subtracting the opposite side dimension value after machining from the opposite side dimension value of the programmed shape. As described above, in the wire-electrical discharge machine, a machining program can be previously created by using an offset function also in machining of an unknown discharge gap.
Ordinarily, although an offset determined once is not changed during machining, there occurs a case that the offset is changed due to special circumstances. For example, in a portion having a stepped section in which a machining state outstandingly changes, since an electrical discharge machining amount changes in a portion where a work is thick in and a portion where the work is thin, a discharge gap also changes. At the time, a final dimension can be properly obtained even in the stepped section by optionally changing an offset value (refer to JP 2011-83873 A).
Likewise the offset, it becomes necessary to optionally change also a taper angle command value in the middle of a machining path at the time of taper machining in which a work is machined while tilting a wire electrode to the work. Further, as described in JP 2007-83372 A, at the time of taper machining, an electrical discharge machining amount becomes different by the difference between the path length on upper surface side of a work and the path length on the lower surface side of the work. To cope with the problem, a taper machining amount correction function for correcting the difference of the electrical discharge machining amount becomes necessary. It is necessary to optionally change also the taper machining amount correction function depending on a machining portion likewise the offset.
To change an offset value during machining, it is necessary to offset, for example, paths in respective normal directions of a straight line machining path program block that is moving at the time (during machining) and a straight line machining path program block that will be carried out next, and it is necessary to previously read and calculate a next block to determine an intersecting point of a path including an offset of a next block at the end point position of a present block.
As shown in FIG. 4, in a machining path 6 in which a present block intersects a next block at a right angle (90 degrees), when offset values instructed to two blocks vary, for example, when the offset value of the present block=a and the offset of the next block=b and the former offset value is different from the latter offset value, an intersecting point of the paths, which has obtained by moving the respective blocks in parallel in the normal directions from the respective blocks becomes an actual direction change point of a moving path of the center of a tool.
First, a problem of the offset machining will be explained.
A conventional method of determining an offset path (machining path including an offset value) when a tangential line exists in a connecting point at the time two straight line blocks are connected each other on a straight line and when front and rear blocks are smoothly connected by an arc and a straight or by an arc and an arc (i.e., when the connecting point is not a cusp) will be explained. As shown in FIG. 5, when an offset change command is instructed to a block next to a present block, the offset path is gradually changed so that the start point of the next block is set to an offset value a of the present block and the end point of the next block is set to a changed offset value b for the first time. For this reason, a block to which the actually changed offset value is perfectly applied is a third block.
The conventional offset path determination method is very inconvenient because the method cannot cope with a case in which it is desired to change an offset value of only a next block. In particular, when a thin plate portion and a thick plate portion of a stepped section exist on the same straight line, the method cannot properly cope with a case in which it is desired to change an offset of only the thin plate portion (refer to FIGS. 6A, 6B and FIGS. 7A,7B).
Next, a problem of the taper machining will be explained.
A taper angle can be changed by instructing a taper angle while a program is being carried out (refer to FIG. 8). A path when the taper angle is changed will be explained as to (1) a case of intersection (FIG. 9) and to (2) a case of contact (FIG. 10). (1) In the case of intersection, when a block to which a taper angle has been instructed intersects a block in front of the above block (an angle between the two blocks is one degree or more), the new taper angle is applied from the beginning of the block to which the taper angle has been instructed. (2) In the case of contact, when the block to which the taper angle has been instructed is in contact with the block in front of the above block (an angle between the two blocks is less than one degree), a previous angle is applied to the start point of the block to which the taper angle has been applied, the angle changes as the block moves and the new taper angle is applied at the end point of the block.
Also in the taper machining, when a taper angle command value is changed extending to blocks with a tangential line, a problem arises in that the change of the taper angle command value is not applied to a necessary block as shown in FIG. 10. As shown in FIG. 11A, in a case of an obtuse angle (an intersecting lines of 179 degrees) at which blocks are almost in contact with each other in the taper machining, when it is intended to change an angle on a ridge line where planes having a taper angle intersect from the paths of front and rear blocks, there is a problem that an actual wire electrode tilts greatly (in the example, a tilt of 64 degrees) and the tilt angle greatly exceeds the maximum taper angle (for example, 30 degrees) of a wire-electrical discharge machine.
As shown in FIG. 12, JP 2002-011620 A discloses such a control method that when an outside of an acute angle corner is machined, an additional block, which does not relate to an external shape to be machined, is disposed and a machining condition is changed in the portion. However, in a technology disclosed in JP 2002-011620 A, when a machining condition is changed at an intersecting point of two blocks that intersect at an obtuse angle, since machining stays while carrying out electrical discharge without a movement command at the point when the machining condition has been changed, a problem arises in that gouging occurs to the external shape to be machined (refer to FIG. 13A).
Further, also in a taper machining amount correction function shown in FIG. 14, FIG. 15, and FIG. 16, taper machining as shown in FIG. 17 will be examined in which a straight line—a left turning arc—a right turning arc—a straight line are connected by a tangential line, a wire electrode travels on a right side of a path, and the taper machining is carried out while tilting to a left side in a traveling direction in a shape for making a product on the left side of the path. (1) In the left turning arc, since a moving distance on a lower side is longer than that on an upper side, it is necessary to carry out a taper machining amount correction for putting the lower side into a work. (2) In the right turning arc, since the moving distance on the lower side is shorter than that on the upper side, it is necessary to carry out the taper machining amount correction for causing the lower side to be away from the work. (3) In also a linear movement, it is necessary to carry out the taper machining amount correction for putting the lower side into the work on the lower side where the moving distance is long.
However, the correction is carried out instantly in an instructed block, the block does not move in a travel direction in a joint of the block is moved only in a taper direction by the correction, and stays at the location with a result of occurrence of gouging due to excessive electric discharging. It is needless that, likewise the offset, in a correction method in which a correction is completed at the end point of a next block, a machining amount cannot be corrected and thus a desired correction cannot be carried out, from which a problem arises.